/*************************************************
 * 描述：设计师插件基类
 *
 * File：cxidesignerbase.h
 * Author：zhangzhiming@mozihealthcare.cn
 * Date：25-8-19
 * Update：
 * ************************************************/

#ifndef CXIDESIGNERBASE_H
#define CXIDESIGNERBASE_H
#include <qglobal.h>
#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
#else
#include <QDesignerCustomWidgetInterface>
#endif


class CxiDesignerBase :public QObject,public QDesignerCustomWidgetInterface
{
	Q_OBJECT
	Q_INTERFACES(QDesignerCustomWidgetInterface)
public:
	explicit CxiDesignerBase(QObject* parent = 0);
	virtual bool isContainer() const;
	virtual bool isInitialized() const;
	virtual QIcon icon() const;
	virtual QString codeTemplate() const;
	virtual QString domXml() const;
	virtual QString group() const;
	virtual QString includeFile() const;
	virtual QString name() const;
	virtual QString toolTip() const;
	virtual QString whatsThis() const;
	virtual void initialize(QDesignerFormEditorInterface*);

protected:
	QString d_name;
	QString d_include;
	QString d_codeTemplate;
	QString d_toolTip;
	QString d_whatsThis;
	QIcon d_icon;
	QString d_domXml;
private:
	bool m_isInitialized;
};


#endif//CXIDESIGNERBASE_H
